package io.xxx.mario.robot;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.data.domain.Pageable;
import org.springframework.data.web.PageableDefault;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "Wechaty Puppet", description = "木偶服务商管理")
@RestController
@RequestMapping("/wechaty_puppet")
public class WechatyPuppetController {

    @Resource
    private WechatyPuppetService wechatyPuppetService;

    @Operation(summary = "分页查询Puppet服务商列表")
    @GetMapping("/page")
    public Page<WechatyPuppet> getPage(@PageableDefault Pageable pageable, String name, Boolean used) {
        return wechatyPuppetService.getPage(pageable, name, used);
    }
}
